設備管理API
獲取設備列表
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
| sub_device_type | []String | Body | 否 | 子設備類型 |
| show_ability | Boolean | Body | 否 | 展示能力 |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | []Object<result> | Body | 返回結果 |
result說明
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| device_id | String | Body | 設備ID |
| device_name | String | Body | 設備名稱 |
| product_name | String | Body | 產品名稱 |
| device_type | String | Body | 設備類型 |
| device_picture_url | String | Body | 設備圖片地址 |
| online | Boolean | Body | 判斷設備在離線狀態 true:在線 false:離線 |
| abilities | []Object<ability> | Body | 能力信息 |
| space | Object<space> | Body | 空間信息 |
| sub_devices | []Object<result> | Body | 子設備信息 |
ability說明
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| ability_id | String | Body | 能力ID |
| ability_name | String | Body | 能力名稱 |
| ability_type | String | Body | 能力類型,見 標準物模型 |
| ability_attribute | []String | Body | 能力所含附加屬性,見 標準物模型 |
| state | String | Body | 狀態,見 標準物模型 |
| attribute | Object | Body | 附加屬性,見 標準物模型 |
space說明
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| space_id | String | Body | 空間ID |
| space_name | String | Body | 空間名稱 |
| parent_space_id | String | Body | 父空間ID |
請求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_device_list",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"show_ability": true
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": [
{
"device_id": "d8b5a73f8dd84abaa94dcs288be49b0cx",
"device_name": "My Device",
"product_name": "HyPanel",
"device_type": "PS51",
"device_picture_url": "https://test.akubela.com/g.png",
"online": true,
"abilities": [
{
"ability_id": "e8b5a73f8dd84abaa94b1c288be49b0cv",
"ability_name": "led1",
"ability_type": "light",
"ability_attribute": [
"brightness"
],
"state": "on",
"attribute": {
"brightness": 70
}
},
{
"ability_id": "e8b5a73f8dd84abaa94b1c288be49b0cb",
"ability_name": "led2",
"ability_type": "light",
"ability_attribute": [],
"state": "off",
"attribute": {}
}
],
"space": {
"parent_space_id": "f8b5a73f8dd84abaa94b1c288be49b0ca",
"space_id": "rf8b5a73f8dd84abaa94b1c288be49b0c",
"space_name": "kitchen"
},
"sub_devices": [
{
"device_id": "d8b5a73f8dd84abaa94b1c288be49b0cf",
"device_name": "My Sub Device",
"product_name": "Motion Sensor",
"device_type": "Motion Sensor",
"device_picture_url": "https://test.akubela.com/o.png",
"abilities": [],
"space": {
"parent_space_id": "f8b5a73f8dd84abaa94b1c288be49b0ca",
"space_id": "rf8b5a73f8dd84abaa94b1c288be49b0c",
"space_name": "kitchen"
},
"online": true
}
]
}
]
}
失敗返回示例
見 接口失敗返回
獲取設備信息
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
| device_id | String | Body | 是 | 設備ID |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | []Object<result> | Body | 返回結果 |
result說明
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| device_id | String | Body | 設備ID |
| device_name | String | Body | 設備名稱 |
| product_name | String | Body | 產品名稱 |
| device_type | String | Body | 設備類型 |
| device_picture_url | String | Body | 設備圖片地址 |
| online | Boolean | Body | 判斷設備在離線狀態 true:在線 false:離線 |
| abilities | []Object<ability> | Body | 能力信息 |
| space | Object<space> | Body | 空間信息 |
| sub_devices | []Object<result> | Body | 子設備信息 |
ability說明
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| ability_id | String | Body | 能力ID |
| ability_name | String | Body | 能力名稱 |
| ability_type | String | Body | 能力類型,見 標準物模型 |
| ability_attribute | []String | Body | 能力所含附加屬性,見 標準物模型 |
| state | String | Body | 狀態,見 標準物模型 |
| attribute | Object | Body | 附加屬性,見 標準物模型 |
space說明
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| space_id | String | Body | 空間ID |
| space_name | String | Body | 空間名稱 |
| parent_space_id | String | Body | 父空間ID |
請求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_device_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"device_id": "d8b5a73f8dd84abaa94dcs288be49b0cx"
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": [
{
"device_id": "d8b5a73f8dd84abaa94dcs288be49b0cx",
"device_name": "My Device",
"product_name": "HyPanel",
"device_type": "PS51",
"device_picture_url": "https://test.akubela.com/g.png",
"online": true,
"abilities": [
{
"ability_id": "e8b5a73f8dd84abaa94b1c288be49b0cv",
"ability_name": "led1",
"ability_type": "light",
"ability_attribute": [
"brightness"
],
"state": "on",
"attribute": {
"brightness": 70
}
},
{
"ability_id": "e8b5a73f8dd84abaa94b1c288be49b0cb",
"ability_name": "led2",
"ability_type": "light",
"ability_attribute": [],
"state": "off",
"attribute": {}
}
],
"space": {
"parent_space_id": "f8b5a73f8dd84abaa94b1c288be49b0ca",
"space_id": "rf8b5a73f8dd84abaa94b1c288be49b0c",
"space_name": "kitchen"
},
"sub_devices": [
{
"device_id": "d8b5a73f8dd84abaa94b1c288be49b0cf",
"device_name": "My Sub Device",
"product_name": "Motion Sensor",
"device_type": "Motion Sensor",
"device_picture_url": "https://test.akubela.com/o.png",
"abilities": [],
"space": {
"parent_space_id": "f8b5a73f8dd84abaa94b1c288be49b0ca",
"space_id": "rf8b5a73f8dd84abaa94b1c288be49b0c",
"space_name": "kitchen"
},
"online": true
}
]
}
]
}
失敗返回示例
見 接口失敗返回
控制設備
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
| device_id | String | Body | 是 | 設備ID |
| ability_id | String | Body | 是 | 能力ID |
| control | String | Body | 是 | 能力控制,見 標準物模型 |
| attribute | Object | Body | 否 | 附加屬性,見 標準物模型 |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | Object | Body | 返回結果 |
請求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "control_device",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"device_id": "d8b5a73f8dd84abaa94dcs288be49b0cx",
"ability_id": "e8b5a73f8dd84abaa94dcs288be49b4ce",
"control": "turn_on",
"attribute": {
"brightness": 70
}
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失敗返回示例
見 接口失敗返回
批量控制設備
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
| devices | []Object<device> | Body | 是 | 設備信息 |
device說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| device_id | String | Body | 是 | 設備ID |
| ability_id | String | Body | 是 | 能力ID |
| control | String | Body | 是 | 能力控制,見 標準物模型 |
| attribute | Object | Body | 否 | 附加屬性,見 標準物模型 |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | Object | Body | 返回結果 |
請求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "batch_control_device",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"devices": [
{
"device_id": "d8b5a73f8dd84abaa94dcs288be49b0cx",
"ability_id": "e8b5a73f8dd84abaa94dcs288be49b4ce",
"control": "turn_on",
"attribute": {
"brightness": 70
}
}
]
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失敗返回示例
見 接口失敗返回
批量控制設備組
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
| spaces | []Object<space> | Body | 是 | 空間信息 |
| devices | []Object<device> | Body | 是 | 設備信息 |
space說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| space_id | String | Body | 是 | 空間ID |
device說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| ability_type | String | Body | 是 | 能力類型,見 標準物模型 |
| control | String | Body | 是 | 能力控制,見 標準物模型 |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | Object | Body | 返回結果 |
請求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "batch_control_device_group",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"spaces": [
{
"space_id": "r8b5a73f8dd84abaa94dcs248be49b0d2"
}
],
"devices": [
{
"ability_type": "light",
"control": "turn_on"
}
]
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失敗返回示例
見 接口失敗返回
開啓設備掃描
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| gateway_device_id | String | Body | 是 | 網關設備ID |
| device_type | String | Body | 否 | 設備類型 |
| residence_id | String | Body | 是 | 住宅ID |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | Object | Body | 返回結果 |
請求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "turn_on_scanning_device",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"gateway_device_id": "d8b5a73f8dd84abaa94dcs288be49b0cx",
"device_type": "light",
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失敗返回示例
見 接口失敗返回
關閉設備掃描
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| gateway_device_id | String | Body | 是 | 網關設備ID |
| residence_id | String | Body | 是 | 住宅ID |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | Object | Body | 返回結果 |
請求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "turn_off_scanning_device",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"gateway_device_id": "d8b5a73f8dd84abaa94dcs288be49b0cx",
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失敗返回示例
見 接口失敗返回
更新設備信息
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| device_id | String | Body | 是 | 設備ID |
| space_id | String | Body | 是 | 空間ID |
| device_name | String | Body | 是 | 設備名稱 |
| residence_id | String | Body | 是 | 住宅ID |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | Object | Body | 返回結果 |
請求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "update_device_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"device_name": "test_device_name",
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"device_id": "d3cbca664f4a10a0ce95452be1b67ca58",
"space_id": "rc3c6e408413be7fdc3e60f34f0950d6b"
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失敗返回示例
見 接口失敗返回
批量更新設備信息
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| devices | []Object<device> | Body | 是 | 設備信息 |
| residence_id | String | Body | 是 | 住宅ID |
device說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| device_id | String | Body | 是 | 設備ID |
| space_id | String | Body | 是 | 空間ID |
| device_name | String | Body | 是 | 設備名稱 |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | Object | Body | 返回結果 |
請求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "batch_update_device_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"devices": [
{
"device_id": "d2ab24943ba75edc0a77211e5084f95e0",
"space_id": "rcf986cb4c00d4a031a56a51a81e430d5",
"device_name": "test_device_name"
}
],
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失敗返回示例
見 接口失敗返回
更新設備能力信息
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| device_id | String | Body | 是 | 設備ID |
| ability_id | String | Body | 是 | 能力ID |
| ability_name | String | Body | 是 | 能力名稱 |
| residence_id | String | Body | 是 | 住宅ID |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | Object | Body | 返回結果 |
請求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "update_device_ability_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"ability_name": "test_name",
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"device_id": "d3cbca664f4a10a0ce95452be1b67ca58",
"ability_id": "ac3c6e408413be7fdc3e60f34f0950d6b"
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失敗返回示例
見 接口失敗返回
批量更新設備能力信息
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| devices | []Object<device> | Body | 是 | 設備信息 |
| residence_id | String | Body | 是 | 住宅ID |
device說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| device_id | String | Body | 是 | 設備ID |
| ability_id | String | Body | 是 | 能力ID |
| ability_name | String | Body | 是 | 能力名稱 |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | Object | Body | 返回結果 |
請求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "batch_update_device_ability_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"devices": [
{
"device_id": "d2ab24943ba75edc0a77211e5084f95e0",
"ability_id": "acf986cb4c00d4a031a56a51a81e430d5",
"ability_name": "test_name"
}
],
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失敗返回示例
見 接口失敗返回
刪除設備信息
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| device_id | String | Body | 是 | 設備ID |
| residence_id | String | Body | 是 | 住宅ID |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | Object | Body | 返回結果 |
請求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "delete_device_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"device_id": "d8b5a73f8dd84abaa94dcs288be49b0cx",
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失敗返回示例
見 接口失敗返回
批量刪除設備信息
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| devices | []Object<device> | Body | 是 | 設備信息 |
| residence_id | String | Body | 是 | 住宅ID |
device說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| device_id | String | Body | 是 | 設備ID |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | Object | Body | 返回結果 |
請求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "batch_delete_device_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"devices": [
{
"device_id": "dfdae91916dc3547beabd353b2dad7a42"
}
],
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失敗返回示例
見 接口失敗返回
獲取ZigBee設備類型列表
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | Object<result> | Body | 返回結果 |
result說明
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| zigbee_device_type | []String | Body | ZigBee設備類型 |
請求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_zigbee_device_type_list",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {
"zigbee_device_type": []
}
}
失敗返回示例
見 接口失敗返回
創建ZigBee設備信息
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| gateway_device_id | String | Body | 是 | 網關設備ID |
| zigbee_device_type | String | Body | 是 | ZigBee設備類型 |
| residence_id | String | Body | 是 | 住宅ID |
| mac | String | Body | 是 | MAC地址 |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | Object<result> | Body | 返回結果 |
result說明
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| device_id | String | Body | 設備ID |
| online | Boolean | Body | 判斷設備在離線狀態 true:在線 false:離線 |
| multi_channel_devices | []Object<multi_channel_device> | Body | 多路設備信息 |
multi_channel_device說明
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| device_id | String | Body | 設備ID |
請求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "create_zigbee_device_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"gateway_device_id": "d8b5a73f8dd84abaa94dcs288be49b0cx",
"zigbee_device_type": "light",
"residence_id": "re8b5a73f8dd84abaa94b1c288be49b0c",
"mac": "C34568542456"
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {
"device_id": "d8b5a73f8dd84abaa94dcs288be49b0c3",
"multi_channel_devices": [],
"online": true
}
}
失敗返回示例
見 接口失敗返回
獲取紅外遙控器列表
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| infrared_remote_controller_type | String | Body | 是 | 紅外遙控器類型 AC Remote:空調 TV Remote:電視 |
| residence_id | String | Body | 是 | 住宅ID |
| infrared_remote_controller_brand_id | String | Body | 是 | 紅外遙控器品牌ID |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | Object<result> | Body | 返回結果 |
result說明
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| infrared_remote_controllers | []Object<infrared_remote_controller> | Body | 紅外遙控器信息 |
infrared_remote_controller說明
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| infrared_remote_controller_id | String | Body | 紅外遙控器ID |
請求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_infrared_remote_controller_list",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"infrared_remote_controller_type": "AC Remote",
"residence_id": "re8b5a73f8dd84abaa94b1c288be49b0c",
"infrared_remote_controller_brand_id": "0"
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {
"infrared_remote_controllers": [
{
"infrared_remote_controller_id": "0"
}
]
}
}
失敗返回示例
見 接口失敗返回
獲取紅外遙控器品牌列表
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| infrared_remote_controller_type | String | Body | 是 | 紅外遙控器類型 AC Remote:空調 TV Remote:電視 |
| residence_id | String | Body | 是 | 住宅ID |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | Object<result> | Body | 返回結果 |
result說明
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| infrared_remote_controller_brands | []Object<infrared_remote_controller_brand> | Body | 紅外遙控器品牌信息 |
infrared_remote_controller_brand說明
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| infrared_remote_controller_brand_id | String | Body | 紅外遙控器品牌ID |
| infrared_remote_controller_brand_name | String | Body | 紅外遙控器品牌名稱 |
請求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_infrared_remote_controller_brand_list",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"infrared_remote_controller_type": "AC Remote",
"residence_id": "re8b5a73f8dd84abaa94b1c288be49b0c"
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {
"infrared_remote_controller_brands": [
{
"infrared_remote_controller_brand_name": "midea",
"infrared_remote_controller_brand_id": "0"
}
]
}
}
失敗返回示例
見 接口失敗返回
創建紅外遙控器信息
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| infrared_remote_controller_matching | Boolean | Body | 是 | 判斷紅外遙控器匹配是否成功 true:成功 false:失敗 |
| infrared_remote_controller_type | String | Body | 是 | 紅外遙控器類型 AC Remote:空調 TV Remote:電視 |
| residence_id | String | Body | 是 | 住宅ID |
| infrared_remote_controller_id | String | Body | 是 | 紅外遙控器ID |
| parent_device_id | String | Body | 是 | 父設備ID |
| infrared_remote_controller_brand_id | String | Body | 是 | 紅外遙控器品牌ID |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | Object<result> | Body | 返回結果 |
result說明
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| device_id | String | Body | 設備ID |
請求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "create_infrared_remote_controller_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"infrared_remote_controller_matching": true,
"infrared_remote_controller_type": "AC Remote",
"residence_id": "re8b5a73f8dd84abaa94b1c288be49b0c",
"parent_device_id": "d8b5a73f8dd84abaa94dcs288be49b0cx",
"infrared_remote_controller_brand_id": "0",
"infrared_remote_controller_id": "0"
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {
"device_id": "d8b5a73f8dd84abaa94dcs288be49b0cx"
}
}
失敗返回示例
見 接口失敗返回
紅外遙控器匹配
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| infrared_remote_controller_function_key | String | Body | 否 | 紅外遙控器功能按鍵 |
| infrared_remote_controller_type | String | Body | 是 | 紅外遙控器類型 AC Remote:空調 TV Remote:電視 |
| residence_id | String | Body | 是 | 住宅ID |
| infrared_remote_controller_id | String | Body | 是 | 紅外遙控器ID |
| device_id | String | Body | 是 | 設備ID |
| infrared_remote_controller_brand_id | String | Body | 是 | 紅外遙控器品牌ID |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | Object | Body | 返回結果 |
請求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "infrared_remote_controller_matching",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"infrared_remote_controller_type": "AC Remote",
"residence_id": "re8b5a73f8dd84abaa94b1c288be49b0c",
"device_id": "d8b5a73f8dd84abaa94dcs288be49b0cx",
"infrared_remote_controller_brand_id": "0",
"infrared_remote_controller_id": "0"
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失敗返回示例
見 接口失敗返回
獲取燈光控制羣組信息
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
| device_id | String | Body | 是 | 設備ID |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | Object<result> | Body | 返回結果 |
result說明
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| device_name | String | Body | 設備名稱 |
| space_id | String | Body | 空間ID |
| control_group | Object<control_group> | Body | 控制羣組 |
control_group說明
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| low_brightness_level_groups | []Object<brightness_level_group> | Body | 低亮度羣組信息 |
| medium_brightness_level_groups | []Object<brightness_level_group> | Body | 中亮度羣組信息 |
| high_brightness_level_groups | []Object<brightness_level_group> | Body | 高亮度羣組信息 |
brightness_level_group說明
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| device_id | String | Body | 設備ID |
| ability_id | String | Body | 能力ID |
請求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_light_control_group_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"device_id": "d11adc223cc4b3bedb6bd4742dedcfa52"
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {
"device_name": "test",
"space_id": "rafa332e258aae1badbb27d31128f442d",
"control_group": {
"low_brightness_level_groups": [
{
"device_id": "dafa332e258aae1badbb27d31128f4421",
"ability_id": "e8b5a73f8dd84abaa94b1c288be49b0c1"
}
],
"medium_brightness_level_groups": [],
"high_brightness_level_groups": []
}
}
}
失敗返回示例
見 接口失敗返回
獲取可組羣控制燈光列表
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | []Object<result> | Body | 返回結果 |
result說明
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| device_id | String | Body | 設備ID |
| device_name | String | Body | 設備名稱 |
| space_id | String | Body | 空間ID |
| space_name | String | Body | 空間名稱 |
| abilities | []Object<ability> | Body | 能力信息 |
ability說明
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| ability_id | String | Body | 能力ID |
| ability_name | String | Body | 能力名稱 |
請求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_groupable_control_light_list",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": [
{
"device_id": "dafa332e258aae1badbb27d31128f442d",
"device_name": "test_device",
"space_id": "r8b5a73f8dd84abaa94dcs248be49b0db",
"space_name": "my room",
"abilities": [
{
"ability_id": "e8b5a73f8dd84abaa94b1c288be49b0cv",
"ability_name": "led1"
}
]
}
]
}
失敗返回示例
見 接口失敗返回
創建燈光控制羣組信息
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
| device_name | String | Body | 是 | 設備名稱 |
| space_id | String | Body | 是 | 空間ID |
| control_group | Object<control_group> | Body | 是 | 控制羣組 |
control_group說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| low_brightness_level_groups | []Object<brightness_level_group> | Body | 是 | 低亮度羣組信息 |
| medium_brightness_level_groups | []Object<brightness_level_group> | Body | 是 | 中亮度羣組信息 |
| high_brightness_level_groups | []Object<brightness_level_group> | Body | 是 | 高亮度羣組信息 |
brightness_level_group說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| device_id | String | Body | 是 | 設備ID |
| ability_id | String | Body | 是 | 能力ID |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | Object<result> | Body | 返回結果 |
result說明
| 參數名 | 類型 | 位置 | 說明 |
|---|
請求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "create_light_control_group_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"device_name": "test",
"space_id": "rafa332e258aae1badbb27d31128f442d",
"control_group": {
"low_brightness_level_groups": [
{
"device_id": "dafa332e258aae1badbb27d31128f4421",
"ability_id": "e8b5a73f8dd84abaa94b1c288be49b0c1"
}
],
"medium_brightness_level_groups": [],
"high_brightness_level_groups": []
}
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {
"device_id": "d8b5a73f8dd84abaa94dcs248be49b0d1"
}
}
失敗返回示例
見 接口失敗返回
更新燈光控制羣組信息
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
| device_id | String | Body | 是 | 設備ID |
| device_name | String | Body | 是 | 設備名稱 |
| space_id | String | Body | 是 | 空間ID |
| control_group | Object<control_group> | Body | 是 | 控制羣組 |
control_group說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| low_brightness_level_groups | []Object<brightness_level_group> | Body | 是 | 低亮度羣組信息 |
| medium_brightness_level_groups | []Object<brightness_level_group> | Body | 是 | 中亮度羣組信息 |
| high_brightness_level_groups | []Object<brightness_level_group> | Body | 是 | 高亮度羣組信息 |
brightness_level_group說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| device_id | String | Body | 是 | 設備ID |
| ability_id | String | Body | 是 | 能力ID |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | Object | Body | 返回結果 |
請求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "update_light_control_group_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"device_id": "dafa332e258aae1badbb27d31128f5521",
"device_name": "test",
"space_id": "rafa332e258aae1badbb27d31128f442d",
"control_group": {
"low_brightness_level_groups": [
{
"device_id": "dafa332e258aae1badbb27d31128f4421",
"ability_id": "e8b5a73f8dd84abaa94b1c288be49b0c1"
}
],
"medium_brightness_level_groups": [],
"high_brightness_level_groups": []
}
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失敗返回示例
見 接口失敗返回
獲取鎖基礎配置
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
| device_id | String | Body | 是 | 設備ID |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | Object<result> | Body | 返回結果 |
result說明
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| language | String | Body | 語言 |
| supported_language | []String | Body | 已支持語言 |
| volume | String | Body | 音量 high:高 medium:中 low:低 mute:靜音 |
| dwell_alarm | Boolean | Body | 判斷是否啓用駐留警報 true:啓用 false:禁用 |
| dwell_time | Integer | Body | 駐留時長,取值:15/20/25,單位:秒 |
| monitoring_scope | String | Body | 監控範圍 large:大 small:小 |
| double_verification | Boolean | Body | 判斷是否啓用雙重認證 true:啓用 false:禁用 |
| wifi_ssid | String | Body | WiFi名稱 |
| wifi_ip | String | Body | WiFi IP |
| wifi_gateway | String | Body | WiFi網關 |
| wifi_rssi | Integer | Body | WiFi信號強度 |
| lock_version | String | Body | 鎖版本 |
| rtsp_url | String | Body | RTSP地址 |
| ciphertext | String | Body | 密文,依賴SDK解析 |
請求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_lock_basic_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"device_id": "d3b5a73f8dd84abaa94dcs288be49b0pf"
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {
"language": "en",
"supported_language": [
"zh",
"en"
],
"volume": "high",
"dwell_alarm": true,
"dwell_time": 20,
"monitoring_scope": "large",
"double_verification": true,
"wifi_ssid": "akubela",
"wifi_ip": "192.168.19.190",
"wifi_gateway": "192.168.19.1",
"wifi_rssi": -30,
"rtsp_url": "rtsp://192.168.19.32",
"ciphertext": "7b3d75f5a8cfa959167852468fca08a1",
"lock_version": ""
}
}
失敗返回示例
見 接口失敗返回
更新鎖基礎配置
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| device_id | String | Body | 是 | 設備ID |
| residence_id | String | Body | 是 | 住宅ID |
| language | String | Body | 否 | 語言 |
| volume | String | Body | 否 | 音量 high:高 medium:中 low:低 mute:靜音 |
| dwell_alarm | Boolean | Body | 否 | 判斷是否啓用駐留警報 true:啓用 false:禁用 |
| dwell_time | Integer | Body | 否 | 駐留時長,取值:15/20/25,單位:秒 |
| monitoring_scope | String | Body | 否 | 監控範圍 large:大 small:小 |
| double_verification | Boolean | Body | 否 | 判斷是否啓用雙重認證 true:啓用 false:禁用 |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | Object | Body | 返回結果 |
請求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "update_lock_basic_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"device_id": "d3b5a73f8dd84abaa94dcs288be49b0pf",
"language": "en",
"volume": "high",
"dwell_alarm": true,
"dwell_time": 20,
"monitoring_scope": "large",
"double_verification": true
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失敗返回示例
見 接口失敗返回
獲取鎖臨時密碼配置
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
| device_id | String | Body | 是 | 設備ID |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | []Object<result> | Body | 返回結果 |
result說明
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| key_id | String | Body | 密碼ID |
| key_name | String | Body | 密碼名稱 |
| temp_key | String | Body | 臨時密碼 |
| repeat_mode | String | Body | 重複模式 never:從不 weekly:每週 |
| available_days | []String | Body | 可用時間 |
| start_time | String | Body | 開始時間,UTC |
| finish_time | String | Body | 結束時間,UTC |
請求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_lock_temp_key_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"device_id": "dr31adc223cc4b3bedb6bd4742dedcfa2"
}
}
成功返回示例
狀態碼:200
{
"success": true,
"timestamp": 1540869200562,
"result": [
{
"key_id": "kr31adc223cc4b3bedb6bd4742dedcfa5",
"key_name": "test",
"repeat_mode": "never",
"available_days": [],
"start_time": "2024-03-15 12:32:43",
"finish_time": "2024-03-15 17:32:43",
"temp_key": "01234567"
}
]
}
失敗返回示例
見 接口失敗返回
創建鎖臨時密碼配置
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
| device_id | String | Body | 是 | 設備ID |
| key_name | String | Body | 是 | 密碼名稱 |
| temp_key | String | Body | 是 | 臨時密碼 |
| repeat_mode | String | Body | 是 | 重複模式 never:從不 weekly:每週 |
| available_days | []String | Body | 否 | 可用時間 |
| start_time | String | Body | 是 | 開始時間,UTC |
| finish_time | String | Body | 是 | 結束時間,UTC |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | Object<result> | Body | 返回結果 |
result說明
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| key_id | String | Body | 密碼ID |
請求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "create_lock_temp_key_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"key_name": "test",
"temp_key": "01234567",
"repeat_mode": "weekly",
"available_days": [
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday",
"Sunday"
],
"start_time": "12:32:43",
"finish_time": "17:32:43",
"residence_id": "r4b5a73f8dd84abaa94dcs248be49b0db",
"device_id": "dr31adc223cc4b3bedb6bd4742dedcfa2"
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {
"key_id": "kr31adc223cc4b3bedb6bd4742dedcfa5"
}
}
失敗返回示例
見 接口失敗返回
刪除鎖臨時密碼配置
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| key_id | String | Body | 是 | 密碼ID |
| residence_id | String | Body | 是 | 住宅ID |
| device_id | String | Body | 是 | 設備ID |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | Object | Body | 返回結果 |
請求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "delete_lock_temp_key_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"key_id": "kr31adc223cc4b3bedb6bd4742dedcfa5",
"residence_id": "r4b5a73f8dd84abaa94dcs248be49b0db",
"device_id": "dr31adc223cc4b3bedb6bd4742dedcfa2"
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失敗返回示例
見 接口失敗返回
批量刪除鎖臨時密碼配置
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| keys | []Object<key> | Body | 是 | 密碼信息 |
| residence_id | String | Body | 是 | 住宅ID |
| device_id | String | Body | 是 | 設備ID |
key說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| key_id | String | Body | 是 | 密碼ID |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | Object | Body | 返回結果 |
請求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "batch_delete_lock_temp_key_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"keys": [
{
"key_id": "kr31adc223cc4b3bedb6bd4742dedcfa5"
}
],
"residence_id": "r4b5a73f8dd84abaa94dcs248be49b0db",
"device_id": "dr31adc223cc4b3bedb6bd4742dedcfa2"
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失敗返回示例
見 接口失敗返回
獲取鎖開門密碼配置
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
| device_id | String | Body | 是 | 設備ID |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | []Object<result> | Body | 返回結果 |
result說明
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| key_id | String | Body | 密碼ID |
| key_name | String | Body | 密碼名稱 |
| open_door_key | String | Body | 開門密碼 |
請求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_lock_open_door_key_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"device_id": "dr31adc223cc4b3bedb6bd4742dedcfa2"
}
}
成功返回示例
狀態碼:200
{
"success": true,
"timestamp": 1540869200562,
"result": [
{
"key_id": "kr31adc223cc4b3bedb6bd4742dedcfa5",
"key_name": "test",
"open_door_key": "123456"
}
]
}
失敗返回示例
見 接口失敗返回
創建鎖開門密碼配置
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
| device_id | String | Body | 是 | 設備ID |
| key_name | String | Body | 否 | 密碼名稱 |
| open_door_key | String | Body | 是 | 開門密碼 |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | Object<result> | Body | 返回結果 |
result說明
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| key_id | String | Body | 密碼ID |
請求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "create_lock_open_door_key_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"open_door_key": "123456",
"key_name": "test",
"residence_id": "r4b5a73f8dd84abaa94dcs248be49b0db",
"device_id": "dr31adc223cc4b3bedb6bd4742dedcfa2"
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {
"key_id": "kr31adc223cc4b3bedb6bd4742dedcfa5"
}
}
失敗返回示例
見 接口失敗返回
更新鎖開門密碼配置
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
| device_id | String | Body | 是 | 設備ID |
| key_id | String | Body | 是 | 密碼ID |
| key_name | String | Body | 是 | 密碼名稱 |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | Object | Body | 返回結果 |
請求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "update_lock_open_door_key_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"device_id": "d3b5a73f8dd84abaa94dcs288be49b0pf",
"key_id": "kr31adc223cc4b3bedb6bd4742dedcfa5",
"key_name": "test2"
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失敗返回示例
見 接口失敗返回
刪除鎖開門密碼配置
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| key_id | String | Body | 是 | 密碼ID |
| residence_id | String | Body | 是 | 住宅ID |
| device_id | String | Body | 是 | 設備ID |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | Object | Body | 返回結果 |
請求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "delete_lock_open_door_key_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"key_id": "kr31adc223cc4b3bedb6bd4742dedcfa5",
"residence_id": "r4b5a73f8dd84abaa94dcs248be49b0db",
"device_id": "dr31adc223cc4b3bedb6bd4742dedcfa2"
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失敗返回示例
見 接口失敗返回
批量刪除鎖開門密碼配置
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| keys | []Object<key> | Body | 是 | 密碼信息 |
| residence_id | String | Body | 是 | 住宅ID |
| device_id | String | Body | 是 | 設備ID |
key說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| key_id | String | Body | 是 | 密碼ID |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | Object | Body | 返回結果 |
請求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "batch_delete_lock_open_door_key_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"keys": [
{
"key_id": "kr31adc223cc4b3bedb6bd4742dedcfa5"
}
],
"residence_id": "r4b5a73f8dd84abaa94dcs248be49b0db",
"device_id": "dr31adc223cc4b3bedb6bd4742dedcfa2"
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失敗返回示例
見 接口失敗返回
獲取鎖指紋配置
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
| device_id | String | Body | 是 | 設備ID |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | []Object<result> | Body | 返回結果 |
result說明
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| key_id | String | Body | 密碼ID |
| key_name | String | Body | 密碼名稱 |
請求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_lock_fingerprint_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"device_id": "dr31adc223cc4b3bedb6bd4742dedcfa2"
}
}
成功返回示例
狀態碼:200
{
"success": true,
"timestamp": 1540869200562,
"result": [
{
"key_id": "kr31adc223cc4b3bedb6bd4742dedcfa5",
"key_name": "test"
}
]
}
失敗返回示例
見 接口失敗返回
更新鎖指紋配置
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
| device_id | String | Body | 是 | 設備ID |
| key_id | String | Body | 是 | 密碼ID |
| key_name | String | Body | 是 | 密碼名稱 |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | Object | Body | 返回結果 |
請求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "update_lock_fingerprint_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"device_id": "d3b5a73f8dd84abaa94dcs288be49b0pf",
"key_id": "kr31adc223cc4b3bedb6bd4742dedcfa5",
"key_name": "test2"
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失敗返回示例
見 接口失敗返回
刪除鎖指紋配置
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| key_id | String | Body | 是 | 密碼ID |
| residence_id | String | Body | 是 | 住宅ID |
| device_id | String | Body | 是 | 設備ID |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | Object | Body | 返回結果 |
請求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "delete_lock_fingerprint_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"key_id": "kr31adc223cc4b3bedb6bd4742dedcfa5",
"residence_id": "r4b5a73f8dd84abaa94dcs248be49b0db",
"device_id": "dr31adc223cc4b3bedb6bd4742dedcfa2"
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失敗返回示例
見 接口失敗返回
批量刪除鎖指紋配置
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| keys | []Object<key> | Body | 是 | 密碼信息 |
| residence_id | String | Body | 是 | 住宅ID |
| device_id | String | Body | 是 | 設備ID |
key說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| key_id | String | Body | 是 | 密碼ID |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | Object | Body | 返回結果 |
請求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "batch_delete_lock_fingerprint_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"keys": [
{
"key_id": "kr31adc223cc4b3bedb6bd4742dedcfa5"
}
],
"residence_id": "r4b5a73f8dd84abaa94dcs248be49b0db",
"device_id": "dr31adc223cc4b3bedb6bd4742dedcfa2"
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失敗返回示例
見 接口失敗返回
開啓鎖指紋配置
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| device_id | String | Body | 是 | 設備ID |
| residence_id | String | Body | 是 | 住宅ID |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | Object | Body | 返回結果 |
請求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "turn_on_lock_fingerprint_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"device_id": "d8b5a73f8dd84abaa94dcs288be49b0lv",
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失敗返回示例
見 接口失敗返回
關閉鎖指紋配置
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| device_id | String | Body | 是 | 設備ID |
| residence_id | String | Body | 是 | 住宅ID |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | Object | Body | 返回結果 |
請求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "turn_off_lock_fingerprint_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"device_id": "d8b5a73f8dd84abaa94dcs288be49b0lv",
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失敗返回示例
見 接口失敗返回
獲取鎖卡片配置
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
| device_id | String | Body | 是 | 設備ID |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | []Object<result> | Body | 返回結果 |
result說明
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| key_id | String | Body | 密碼ID |
| key_name | String | Body | 密碼名稱 |
請求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_lock_card_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"device_id": "dr31adc223cc4b3bedb6bd4742dedcfa2"
}
}
成功返回示例
狀態碼:200
{
"success": true,
"timestamp": 1540869200562,
"result": [
{
"key_id": "kr31adc223cc4b3bedb6bd4742dedcfa5",
"key_name": "test"
}
]
}
失敗返回示例
見 接口失敗返回
更新鎖卡片配置
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
| device_id | String | Body | 是 | 設備ID |
| key_id | String | Body | 是 | 密碼ID |
| key_name | String | Body | 是 | 密碼名稱 |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | Object | Body | 返回結果 |
請求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "update_lock_card_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"device_id": "d3b5a73f8dd84abaa94dcs288be49b0pf",
"key_id": "kr31adc223cc4b3bedb6bd4742dedcfa5",
"key_name": "test2"
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失敗返回示例
見 接口失敗返回
刪除鎖卡片配置
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| key_id | String | Body | 是 | 密碼ID |
| residence_id | String | Body | 是 | 住宅ID |
| device_id | String | Body | 是 | 設備ID |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | Object | Body | 返回結果 |
請求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "delete_lock_card_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"key_id": "kr31adc223cc4b3bedb6bd4742dedcfa5",
"residence_id": "r4b5a73f8dd84abaa94dcs248be49b0db",
"device_id": "dr31adc223cc4b3bedb6bd4742dedcfa2"
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失敗返回示例
見 接口失敗返回
批量刪除鎖卡片配置
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| keys | []Object<key> | Body | 是 | 密碼信息 |
| residence_id | String | Body | 是 | 住宅ID |
| device_id | String | Body | 是 | 設備ID |
key說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| key_id | String | Body | 是 | 密碼ID |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | Object | Body | 返回結果 |
請求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "batch_delete_lock_card_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"keys": [
{
"key_id": "kr31adc223cc4b3bedb6bd4742dedcfa5"
}
],
"residence_id": "r4b5a73f8dd84abaa94dcs248be49b0db",
"device_id": "dr31adc223cc4b3bedb6bd4742dedcfa2"
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失敗返回示例
見 接口失敗返回
開啓鎖卡片配置
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| device_id | String | Body | 是 | 設備ID |
| residence_id | String | Body | 是 | 住宅ID |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | Object | Body | 返回結果 |
請求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "turn_on_lock_card_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"device_id": "d8b5a73f8dd84abaa94dcs288be49b0lv",
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失敗返回示例
見 接口失敗返回
關閉鎖卡片配置
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| device_id | String | Body | 是 | 設備ID |
| residence_id | String | Body | 是 | 住宅ID |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | Object | Body | 返回結果 |
請求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "turn_off_lock_card_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"device_id": "d8b5a73f8dd84abaa94dcs288be49b0lv",
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失敗返回示例
見 接口失敗返回
獲取鎖歷史記錄
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
| device_id | String | Body | 是 | 設備ID |
| page_size | Integer | Body | 是 | 每頁數量 |
| page_index | Integer | Body | 是 | 當前頁數 |
| lock_record_type | String | Body | 否 | 鎖記錄類型 unlock:開鎖 alarm:警報 doorbell:門鈴 capture:抓拍 |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | []Object<result> | Body | 返回結果 |
result說明
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| lock_record_id | String | Body | 鎖記錄ID |
| lock_record_type | String | Body | 鎖記錄類型 unlock:開鎖 alarm:警報 doorbell:門鈴 capture:抓拍 |
| capture_picture_url | String | Body | 抓拍圖地址 |
| lock_time | String | Body | 鎖時間,UTC |
| note | String | Body | 記錄 |
請求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_lock_history",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"page_size": 1,
"page_index": 1,
"device_id": "d1b5a73f8dd84abaa94dcs248be49b0db",
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": [
{
"lock_record_id": "r1b5a73f8dd84abaa94dcs248be49b0d1",
"lock_type": "unlock",
"capture_picture_url": "",
"lock_time": "2025-02-16 13:32:43",
"note": ""
}
]
}
失敗返回示例
見 接口失敗返回
鎖喚醒
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| device_id | String | Body | 是 | 設備ID |
| residence_id | String | Body | 是 | 住宅ID |
| wakeup_mode | String | Body | 否 | 喚醒模式 sip:SIP(默認) bluetooth:藍牙 |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | Object | Body | 返回結果 |
請求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "lock_wakeup",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"device_id": "d8b5a73f8dd84abaa94dcs288be49b0lv",
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失敗返回示例
見 接口失敗返回